<?php 
	$grid = $this->grid($this->modelList);
	$grid->addHeader();
	$grid->startBody();
	
	foreach ($this->modelList as $model) {
		?>
		<td pipes:for="url">
			<a href="<?php echo $model->url; ?>"><?php echo $model->title; ?> :: <em><?php echo $model->url; ?></em></a>
		</td>
		<td pipes:for="tags">
			<?php 
			foreach ($model->tags as $tag) {
				echo $this->anchor($this->tagUri($tag->name), $tag->name);
			}
			?>
		</td>
		<?php
		$grid->addRow($model);
	}
	
	echo $grid->generate();
	
	/**
	 * @internal 
	 * note that this code is located in the browse because we need it to
	 * execute on every load of the browse code (i.e., when refreshing
	 * after an add).  This may be changed at a later point.
	 */
	if ($this->controller->isAjax) : ?>
		<script type="text/javascript">Pipes.ajaxify($('dashboard_browse'), {type: 'AjaxifiedLinks'}).process();</script>
	<?php endif;
?>
